package flex.cc.uac.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import flex.cc.base.dto.LoginAuthDto;
import flex.cc.uac.entity.UacActionEntity;
import flex.cc.uac.entity.UacMenuEntity;

import java.util.List;


/**
 * 权限表
 *
 * @author zhangzk
 * @email zhangzhikai@sinosoft.com.cn
 * @date 2020-06-21 22:53:59
 */
public interface UacActionService extends IService<UacActionEntity> {

    /**
     * 根据用户Id查询拥有的按钮权限.
     */
    List<UacActionEntity> getOwnActionListByUserId(Long userId);

    UacActionEntity matchesByUrl(String requestUrl);

    IPage<UacActionEntity> queryActionListWithPage(UacActionEntity uacActionEntity);

    List<UacActionEntity> listActionListByRoleId(Long roleId);

    List<UacActionEntity> listActionList(List<UacMenuEntity> uacMenus);

    List<Long> getCheckedActionList(Long roleId);

    int deleteActionById(Long actionId);

    void saveAction(UacActionEntity uacAction, LoginAuthDto loginAuthDto);
}


